<template>
  <div>
<h2 :class="{pink:age<sum}">{{age}}</h2>
<h2 :class="{pink:sum<age}">{{age}}</h2>
<h2 :class="{pink:false}">{{sum}}</h2>
<h2 :class="{pink:true}">{{sum}}</h2>
  </div>
</template>

<script>
export default {
data(){
  return{
    age:34,
    sum:18
  }
}
}
</script>

<style>
.pink{
  color:pink
}
</style>